//
//  DmcWrapper.h
//  MultiScreens
//
//  Created by apple on 14-12-23.
//  Copyright (c) 2014年 skyworth.digital. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DlnaItemCapsule.h"
#import "MediaItem.h"

#define NOTIFICATION_ONMRPLAYSTATECHANGED @"notification_onmrplaystatechanged"
#define NOTIFICATION_ONPLAYABSOLUTETIME @"notification_onplayabsolutetime"
#define SEARCH_PAGE_SIZE 30

@protocol DmcWrapperDelegate <NSObject>
@optional
-(void)OnMSAdded:(DlnaDevice*)device;
-(void)OnMSRemoved:(DlnaDevice*)device;
-(void)OnMRAdded:(DlnaDevice*)device;
-(void)OnMRRemoved:(DlnaDevice*)device;

@end


@interface DmcWrapper : NSObject

@property(strong,nonatomic) id<DmcWrapperDelegate> delegate;

+(DmcWrapper*)sharedDmsWrapper;

-(void)startDmc;

-(NSArray*)searchEpgWithUuid:(NSString *)uuid ChannelID:(NSString*)channelID StartDate:(NSDate *)startDate EndDate:(NSDate *)endDate;

-(NSArray*)doSearchWithUuid:(NSString*)uuid Type:(NSString*)type Index:(NSInteger)index Count:(NSInteger)count;
-(void)doSearchWithUuid:(NSString*)uuid Type:(NSString*)type Index:(NSInteger)index Count:(NSInteger)count CompleteBlock:(void(^)(NSArray* array,int requestCount))block;
-(NSArray*)doBrowseWithUuid:(NSString*)uuid ObjectClass:(NSArray*)objClassArray;
-(BOOL)setPlayingDmrWithUUID:(NSString*)uuid displayPairNum:(int)pairNum;

-(BOOL)setPlayingItem:(MediaItem*)item SeekTime:(NSString*)reltime;

-(void)setPlayState:(NSString*)state;
-(void)setPlaySeek:(NSString*)reltime;
-(void)setMediaPair:(NSString*)uuid DeviceName:(NSString*)deviceName DisplayNum:(int)displayNum;
-(void)cancelSetMediaPair:(NSString*)uuid DeviceName:(NSString*)deviceName DisplayNum:(int)displayNum;

-(void)setTvPlayByID:(NSInteger)TVID;

-(void)setVolume:(NSInteger)volume;
-(void)tryGetVolume;

@end
